﻿using Ken_WPF_UI.Data;
using Ken_WPF_UI.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Ken_WPF_UI.View
{
    /// <summary>
    /// ListViewWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ListViewWindow : Window
    {
        public ListViewWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            List<UserInfo> userInfos = UserData.GetUserList();
        
            //方式一
            listView1.ItemsSource = userInfos;
            //方式二
            listView2.DataContext = userInfos;
        }

    }
}
